<!-- most review -->
<div id="most_review">
    <div class="most_title">Phim xem nhiều nhất</div>
    <div class="content">
        <?php
        $i = 0;
        foreach($mostViewsList as $movie):
            $href = base_url() . 'video/view/' . $movie['movie_id'] . '/' . convertUri($movie['name']) . '.html';
            $name = $movie['name'];
            $rating = $movie['rating'] * 15;
            $views = $movie['views'];
            $image = $movie['image'];
        echo "<div class=\"wrapper_content\">
        <div class=\"h_vote\">
            <div class=\"h_vote_point\">
                <ul class='star-rating' id='star-rating'>
                    <div id='mystar-rating'>
                        <li class=\"current-rating\" style=\"width:" . $rating . "px\"></li>
                    </div>
                </ul>
            </div>
            <div class=\"h_vote_cm\">" . $views . "</div>
        </div>
        <div class=\"h_image\"><a href=\"$href\">
            <img class=\"play-img\" src=\"" . base_url() . "images/play2.png\" title=\"$name\"/>
            <img src=\"" . base_url() . "$image\" title=\"$name\"/>
        </a></div>
        <div class=\"h_title\"><a href=\"$href\" title=\"$name\">".$name."</a></div>

    </div>";
    endforeach;
    ?>

        <!-- end img hang 1-->
    </div>
    <div class="paging">
        <div class="loading"></div>
        <div class="pagination">
        <?php
        //phan trang
        $temp = '';
        //first page
        if($currPage != 1){
            $prePage = $currPage - 1;
            echo "<span onclick=\"mostViews(1)\"> << </span>";
            echo "<span onclick=\"mostViews($prePage)\"> < </span>";
        }
        for($i = 0; $i < count($pageArr); $i++):
            if($pageArr[$i] != $currPage)
                $temp .= "<span onclick=\"mostViews(".$pageArr[$i].");\">".$pageArr[$i]."</span>";
            else
                $temp .= "<span class='active'>".$pageArr[$i]."</span> ";

        endfor;
        echo $temp;
        //last page
        if($currPage != $endPage){
            $nextPage = $currPage + 1;
            echo "<span onclick=\"mostViews($nextPage)\"> > </span>";
            echo "<span onclick=\"mostViews($endPage)\"> >> </span>";
        }
        ?>
        </div>
    </div>
</div>
<!-- end most review -->